import pandas as pd
from sqlalchemy import create_engine

# Read the Excel file
df = pd.read_excel('product_price.xlsx')

# Create a connection to your MySQL database
engine = create_engine('mysql+pymysql://red:2003721%40chen@106.15.46.141:3306/red')

# Insert the data into the MySQL table
df.to_sql('product_price', con=engine, if_exists='append', index=False)
# Query the data from the MySQL table
query_df = pd.read_sql('SELECT * FROM product_price', con=engine)

# Print the queried data
print(query_df)